function main() {
    var self = this;
    debugger
    let arr = this.data.id.split("_index");
    let rowIdex = arr.length === 2 ? parseInt(arr[1]) : 0;
    // 找到明细表格元素
    let dt = this.$$("detail_list_44557l");

    let cardValur = dt.$$getDataList()[rowIdex];

    if (cardValur.cascader_1ah5fk) {
        if (cardValur.cascader_1ah5fk[1]) {
            let allComList = dt.data.props.list[rowIdex].children
            processEvent(cardValur.cascader_fr67xm[1], allComList);
        } else {
            self.$message.error("请选择小类！");
            let allComList = dt.data.props.list[rowIdex].children
            let cascader = allComList.find(item => item.id.indexOf("cascader_fr67xm") > -1);

            cascader.props.defaultValue.value = null;
        }
    }

}

function processEvent(eventId, allComList) {

    // 分值模块
    let scoreBlock = allComList.find(item => item.id.indexOf("number_input_6okg75") > -1);
    let saveScoreBlock = allComList.find(item => item.id.indexOf("number_input_hi2wfr") > -1);


    // 处理选项
    let resultSelectBlock = allComList.find(item => item.id.indexOf("radio_axtaio") > -1);

    // 处理大类id,大类名称
    let bixEventIdBlock = allComList.find(item => item.id.indexOf("number_input_5t42n7") > -1);
    let bixEventNameBlock = allComList.find(item => item.id.indexOf("text_input_h0x5kz") > -1);

    let eventIdBlock = allComList.find(item => item.id.indexOf("number_input_fcgsa") > -1);
    let eventNameBlock = allComList.find(item => item.id.indexOf("text_input_1p2twy") > -1);


    let initParams = [{
        name: "eventTypeId",
        valueContent: eventId
    }
    ];
    api.DATA_SOURCE_EXECUTE("13a1fe78-e73a-44c6-9209-abe0688012b6", "ddcat", initParams, [], "").then(res => {
        console.log(res);
        let eventJson = JSON.parse(res['result']).result[0];
        // 选择事项
        scoreBlock.props.defaultValue.value = eventJson.score;
        // 处理选项
        bixEventIdBlock.props.defaultValue.value = eventJson.mainTypeId;
        bixEventNameBlock.props.defaultValue.value = eventJson.mainTypeName;
        eventIdBlock.props.defaultValue.value = eventJson.eventTypeId;
        eventNameBlock.props.defaultValue.value = eventJson.eventTypeName;
        resultSelectBlock.props.behavior.value = "NORMAL"
        saveScoreBlock.props.defaultValue.value = 0;

        // 处理选项
        let options = [];
        if (eventJson.scoreType === 1) {
            options = [
                {label: '合格', value: "1", disabled: false},
                {label: '不合格', value: "2", disabled: false}
            ];
        } else if (eventJson.scoreType === 2) {
            options = [{label: '加分', value: "3", disabled: false},
                {label: '不加分', value: "4", disabled: false}];
        }
        resultSelectBlock.props.dataSource.options = options;

    }).catch(err => {
        console.error(err);
    });
}
